package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PointRecordMapper;
import com.ruoyi.system.domain.PointRecord;
import com.ruoyi.system.service.IPointRecordService;

/**
 * 积分信息Service业务层处理
 * 
 * @author 不丢
 * @date 2024-10-11
 */
@Service
public class PointRecordServiceImpl implements IPointRecordService 
{
    @Autowired
    private PointRecordMapper pointRecordMapper;

    /**
     * 查询积分信息
     * 
     * @param id 积分信息主键
     * @return 积分信息
     */
    @Override
    public PointRecord selectPointRecordById(Long id)
    {
        return pointRecordMapper.selectPointRecordById(id);
    }

    /**
     * 查询积分信息列表
     * 
     * @param pointRecord 积分信息
     * @return 积分信息
     */
    @Override
    public List<PointRecord> selectPointRecordList(PointRecord pointRecord)
    {
        return pointRecordMapper.selectPointRecordList(pointRecord);
    }

    /**
     * 新增积分信息
     * 
     * @param pointRecord 积分信息
     * @return 结果
     */
    @Override
    public int insertPointRecord(PointRecord pointRecord)
    {
        pointRecord.setCreateTime(DateUtils.getNowDate());
        return pointRecordMapper.insertPointRecord(pointRecord);
    }

    /**
     * 修改积分信息
     * 
     * @param pointRecord 积分信息
     * @return 结果
     */
    @Override
    public int updatePointRecord(PointRecord pointRecord)
    {
        return pointRecordMapper.updatePointRecord(pointRecord);
    }

    /**
     * 批量删除积分信息
     * 
     * @param ids 需要删除的积分信息主键
     * @return 结果
     */
    @Override
    public int deletePointRecordByIds(Long[] ids)
    {
        return pointRecordMapper.deletePointRecordByIds(ids);
    }

    /**
     * 删除积分信息信息
     * 
     * @param id 积分信息主键
     * @return 结果
     */
    @Override
    public int deletePointRecordById(Long id)
    {
        return pointRecordMapper.deletePointRecordById(id);
    }
}
